Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Reliably track proc macro & build.rs code coverage #8210

Merged
merged 1 commit into from
Feb 11, 2020

Conversation

ryoqun
Copy link
Contributor

@ryoqun ryoqun commented Feb 11, 2020

Problem

Coverages for proc-macro and build.rs isn't reliable because these are executed at the compile-time, which can result in being skipped due to caches.

> # [Codecov](https://codecov.io/gh/solana-labs/solana/pull/8199?src=pr&el=h1) Report
> 
> > Merging [#8199](https://codecov.io/gh/solana-labs/solana/pull/8199?src=pr&el=desc) into [master](https://codecov.io/gh/solana-labs/solana/commit/df782b93ae2c4196567340d9f6425b3cfc314fdc?src=pr&el=desc) will **decrease** coverage by `<.1%`.
> > The diff coverage is `0%`.
> 
> ```diff
> @@           Coverage Diff            @@
> ##           master   #8199     +/-   ##
> ========================================
> - Coverage    81.3%   81.3%   -0.1%     
> ========================================
>   Files         251     248      -3     
>   Lines       53962   53933     -29     
> ========================================
> - Hits        43876   43852     -24     
> + Misses      10086   10081      -5
> ```

And, I'm obsessed just with coverages too much; But this is the final PR of my several-month-long journey to the perfect coverage tracking. After this, there should be no coverage issues whatsoever!!!

Summary of Changes

Disable caching for them by touch-ing. Yes, build time will get slower but coverage job isn't longest to finish. :p Also, the number of affected solana-* crates are small compared to vast of other dependant crates.

And, I'm relieved from unreliable coverages finally.

Background

In anticipation of #8012 (which introduces both moderate amount of proc macro and build.rs, which would disturbance other PRs after merged without this.)

@ryoqun ryoqun requested a review from mvines February 11, 2020 15:10
@codecov
Copy link

codecov bot commented Feb 11, 2020

Codecov Report

Merging #8210 into master will increase coverage by <.1%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           master   #8210     +/-   ##
========================================
+ Coverage    81.3%   81.3%   +<.1%     
========================================
  Files         251     251             
  Lines       54039   54039             
========================================
+ Hits        43955   43956      +1     
+ Misses      10084   10083      -1

@ryoqun ryoqun added the v0.23 label Feb 11, 2020
@ryoqun ryoqun merged commit 890919d into solana-labs:master Feb 11, 2020
mergify bot pushed a commit that referenced this pull request Feb 11, 2020
@ryoqun
Copy link
Contributor Author

ryoqun commented Feb 11, 2020

@mvines Thanks for quick approval! :)

This was referenced Nov 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants